<?php

if (validation_errors()) :
?>
<section class="content-header">
<div class='alert alert-block alert-error fade in'>
    <a class='close' data-dismiss='alert'>&times;</a>
    <h4 class='alert-heading'>
        <?php echo lang('hometop_errors_message'); ?>
    </h4>
    <?php echo validation_errors(); ?>
</div>
</section>
<?php
endif;

$id = isset($hometop->tag_id) ? $hometop->tag_id : '';

?>
<!-- <section class="content-header">
      <h1>
        General Form Elements
        <small>Preview</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="#">Forms</a></li>
        <li class="active">General Elements</li>
      </ol>
    </section> -->

<!-- Main content -->
<section class="content">
  <div class="row">
    <div class="col-xs-12">
        <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">新增<?php echo lang('hometop_area_title'); ?></h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <?php echo form_open($this->uri->uri_string(), 'class="form-horizontal"'); ?>
              <div class="box-body">
                 <div class="form-group">
                  <?php echo form_label('城市', 'p_id', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-5">
                        <select class="form-control select2" style="width: 100%;" name="city_id" id="city_id">
                          <option selected="selected" value="0">选择城市</option>
                                 <option value="1" >全局</option>
                           <?php foreach ($cities as $cities) : ?>
                                 <option value="<?php echo $cities->area_id; ?>" ><?php echo $cities->area_name; ?></option>
                          <?php endforeach; ?>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                  <?php echo form_label('URL ', 'banner_url', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-5">
                            <input id='banner_url' type='text' required='required' name='banner_url' class="form-control" maxlength='100'  />
                    </div>
                </div>

                  <div class="form-group">
                  <?php echo form_label('图片', '', array('class'=>'col-sm-2 control-label')); ?>
                  <div class="col-md-10">
                                  <div id="container">
                                      <a class="btn btn-default btn-lg " id="pc_pickfiles" href="#" >
                                          <i class="glyphicon glyphicon-plus"></i>
                                              <span>桌面端</span>
                                      </a>
                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                      <a class="btn btn-default btn-lg " id="mobile_pickfiles" href="#" >
                                          <i class="glyphicon glyphicon-plus"></i>
                                              <span>移动端</span>
                                      </a>
                                  </div>
                    </div>
                </div>

                <div class="form-group">
                  <?php echo form_label('', '', array('class'=>'col-sm-2 control-label')); ?>
                  <div class="col-md-10" id="pic_list">
                                  
                    </div>
                </div>
              </div>
              <!-- /.box-body -->

              <div class="box-footer">
                <button type="submit" name='save' class="btn btn-primary">提交</button>
                <?php echo anchor(SITE_AREA . '/home/hometop', '取消', 'class="btn btn-default pull-right"'); ?>
              </div>
            <?php echo form_close(); ?>
          </div>

          </div>
      </div>
</section>